

        <g:set var="entityName" value="${message(code: 'leave.label', default: 'Leave')}" />
            <g:form method="post" >
                <g:hiddenField name="id" value="${leaveInstance?.id}" />
                <g:hiddenField name="version" value="${leaveInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                         
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="startTime"><g:message code="leave.startTime.label" default="Start Time" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: leaveInstance, field: 'startTime', 'errors')}">
                                    <g:datePicker name="startTime" class="select" precision="hour" 
                                    years="${[Calendar.instance.get(Calendar.YEAR)]}" value="${leaveInstance?.startTime}"  />
                                    </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="endTime"><g:message code="leave.endTime.label" default="End Time" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: leaveInstance, field: 'endTime', 'errors')}">
                                    <g:datePicker name="endTime" class="select" precision="hour" 
                                    years="${[Calendar.instance.get(Calendar.YEAR)]}" value="${leaveInstance?.endTime}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="approver"><g:message code="leave.approver.label" default="Approver" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: leaveInstance, field: 'approver', 'errors')}">
                                    <g:select name="approver.id" class="select" from="${approvers}" optionKey="id" value="${leaveInstance?.approver?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="reason"><g:message code="leave.reason.label" default="Reason" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: leaveInstance, field: 'reason', 'errors')}">
                                    <g:textArea name="reason" cols="40" rows="5" value="${leaveInstance?.reason}" />
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                </div>
            </g:form>
